{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "fec521cb07e44f82988afff738012d70",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Viewer(image=<itkImagePython.itkImageUC3; proxy of <Swig Object of type 'itkImageUC3 *' at 0x0000029F3F95D540>…"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# import sys\n",
    "# sys.path.append('../../')\n",
    "import h5py\n",
    "import itk, itkExtras\n",
    "from itkwidgets import view\n",
    "import numpy as np\n",
    "# array = np.load('./mask.npy')\n",
    "with h5py.File('./back', 'r') as file:\n",
    "    array = file['lung_mask'].value\n",
    "array = array.astype(np.uint8)\n",
    "# print(array.shape)\n",
    "# img = itkExtras.GetImageFromArray(array)\n",
    "# img.SetSpacing([1, 1, 1])\n",
    "view(array)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "eroder = itk.BinaryErodeImageFilter[itk.Image.UC3, itk.Image.UC3, itk.FlatStructuringElement.x3].New()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda root]",
   "language": "python",
   "name": "conda-root-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
